export default function() {  
    function getProblemType(type: number, t: Function) {  
        const typeMap = {  
            1: t('enum.single'),  
            2: t('enum.fill'),  
            3: t('enum.judge'),  
            4: t('enum.multiple'),  
            5: t('enum.big')  
        };  
        return typeMap[type] || 'unknown';  
    }  

    function getDifficultyType(type: number, t: Function) {  
        const typeMap = {  
            1: t('enum.simple'),  
            2: t('enum.medium'),  
            3: t('enum.difficulty'),  
        };  
        return typeMap[type] || 'unknown';  
    }  

    
    function getCodeLanguge(codeLanguage) {  
        return `language-${codeLanguage} line-numbers`;
    } 


    function getExamRegisterUserType(status){
        const typeMap={
            1:"已加入",
            2:"已交卷",
            3:"评测中",
            4:"已完成",
            5:"失败"
        }
        return typeMap[status]
    }


    const powerDescirpt={
        "test":"仅作测试，无任何作用",
        "access_admin_view":"是否允许查看管理界面（要记得加！！）",
        "account_ban":"禁封用户",
        "account_del":"删除账号",
        "problem_add_update":"题目的增改",
        "problem_del":"题目的删除",
        "problem_unvisible_look":"未公开题目的查看权限",
        "del_user":"用户的删除",
        "save_user_role":"用户角色和权限的增删改",
        "user_disable":"用户的禁用",
        "exam_add_update":"考试的增删改，考试用户的删，考试用户状态的改，考试阅卷功能",
        "exam_user_detail_look":"考试详情的查看",
        "teach_comment_add_update":"考试中教师评语的增删改"
    }

    return {powerDescirpt,getProblemType,getDifficultyType,getCodeLanguge,getExamRegisterUserType}
}
